/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Banking;

/**
 *
 * @author Root
 */
class Account {

    double balance;

    public Account(double balance) {
        this.balance = balance;
    }

    public double getBalance() {
        return balance;
    }

    public double deposit(double amt) {
        System.out.println("deposit " + amt);
        return balance=(balance + amt);

    }

    public double withdraw(double amt) {
        System.out.println("withdraw " + amt);
        return balance=(balance - amt);
    }

    public void show_acc() {
        System.out.println("Creating an account with a " + balance + " balance");

    }

    public void show_balance() {
        System.out.println("the  account has a balance of  " + getBalance());

    }
}
